package com.cesce.batch.cobros.reverse;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.roo.addon.dbre.RooDbManaged;
import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity(versionField = "", table = "COBREGISTRO")
@RooDbManaged(automaticallyDelete = false)
public class Cobregistro {
	
    @OneToMany(mappedBy = "idregistro", cascade =    {CascadeType.PERSIST, CascadeType.REMOVE})
    private Set<Cobcomunicados> cobcomunicadoss;
 
    @OneToMany(mappedBy = "idregistro")
    private Set<Cobhistoricoregistro> cobhistoricoregistroes;
    
    @ManyToOne
    @JoinColumn(name = "IDESTADO", referencedColumnName = "IDESTADO")
    private Cobestados idestado;
    
    @ManyToOne
    @JoinColumn(name = "IDMOTIVO", referencedColumnName = "IDMOTIVO")
    private Cobmotivos idmotivo;
    
    @ManyToOne
    @JoinColumn(name = "IDCODPARAMETRO", referencedColumnName = "IDCODPARAMETRO")
    private Cobparametros idcodparametro;
    
    @Column(name = "POLIZA")
    private BigDecimal poliza;
    
    @Column(name = "MODALIDAD")
    private BigDecimal modalidad;
    
    @Column(name = "FILIAL")
    private BigDecimal filial;
    
    @Column(name = "FECHAENTRADA")
    @Temporal(TemporalType.DATE)
    @DateTimeFormat(style = "S-")
    private Date fechaentrada;
    
    @Column(name = "CODREFUSER", length = 20)
    private String codrefuser;
    
    @Column(name = "NOMBREFICHEROUSUARIO", length = 50)
    private String nombreficherousuario;
    
    @Column(name = "NOMBREINTERNOFICHERO", length = 50)
    private String nombreinternofichero;
    
    @Column(name = "LINEASTOTALES")
    private BigDecimal lineastotales;
    
    @Column(name = "LINEASCORRECTAS")
    private BigDecimal lineascorrectas;
    
    @Column(name = "LINEASERRONEAS")
    private BigDecimal lineaserroneas;
    
    @Column(name = "FECHAULTIMAACTUALIZACION")
    @Temporal(TemporalType.DATE)
    @DateTimeFormat(style = "S-")
    private Date fechaultimaactualizacion;
    
    @Column(name = "TIPOMOVIMIENTO")
    private BigDecimal tipomovimiento;
    
    @Column(name = "USUARIOCESNET", length = 20)
    private String usuariocesnet;
    
    @Column(name = "COBROSCORRECTOS", precision = 16, scale = 3)
    private BigDecimal cobroscorrectos;
    
    @Column(name = "FECHANOTIFICACION", length = 6)
    private String fechanotificacion;
    
    @Column(name = "TIPOUSUARIO", length = 2)
    private String tipousuario;
    
    @Column(name = "IMPORTETOTAL", precision = 19, scale = 3)
    private BigDecimal importetotal;
    
    
    @Transient
    private String cobrosCorrectosParteEntera;
    
    @Transient
    private String cobrosCorrectosParteDecimal;
    
    @Transient
    private String situacion;
    
}
